package com.xaicode.template.gendata.mall.common;

import java.util.Random;

/**
 * @author Locker xaicode@sina.com
 * @version 1.0
 * @date 2022/5/24 0024 22:06
 */
public class RandomNum {
    public static int getRandInt(int fromNum, int toNum) {
        return fromNum + (new Random()).nextInt(toNum - fromNum + 1);
    }

    public static int getRandInt(int fromNum, int toNum, Long seed) {
        return fromNum + (new Random(seed)).nextInt(toNum - fromNum + 1);
    }
}
